package com.rran.study.designpattern.structural.adapter;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author yy
 * @Type MyService.java
 * @Desc
 * @date 2020/7/26 21:45
 */
public class MyService {
    //v1版本
    public Map getMemberMap() {
        Map map = new HashMap();
        map.put(0, "1");
        map.put(1, "1");
        map.put(2, "1");
        return map;
    }



    //该代码不能改变
    public void saveMember(Map map) {
        for (int i = 0; i < map.size(); i++) {
            // 使用I作为MapKey获取数据
            String value = (String) map.get(i);
            System.out.println("value:" + value);
        }
    }
}
